package com.headmaster.wap.util;

public class WeixinConstant {
	
	public static final String CACHE_OVERALL_ACCESS_TOKEN = "cache_overall_access_token";
	
	public static final String CACHE_WEIXIN_SERVER_IPS = "cache_weixin_Server_ips";
	
	public static final String TOKEN = "mogo_weixin";

	public static final String OPEN_BIND_PAGE_TOKEN = "960c7b8768e7";
	
	public static final String GET_CODE_URL = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect";
	
	public static final String GET_OPENID_URL = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code";
	
	public static final String GET_ACCESS_TOKEN = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET";
	
	public static final String SEND_TEMP_MSG = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=ACCESS_TOKEN";
	
	public static final String GET_WEIXIN_SERVER_IP = "https://api.weixin.qq.com/cgi-bin/getcallbackip?access_token=ACCESS_TOKEN";
	
	//通过网页授权获取用户信息
	public static final String GET_SNSAPI_USERINFO = "https://api.weixin.qq.com/sns/userinfo?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN";
	//查询微信用户所有信息
	public static final String GET_BASIC_USERINFO = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN";
	//POST方式向微信发送信息
	public static final String POST_SEND_URL = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN";
	
	public static final String POST_MEDIA_URL = "https://api.weixin.qq.com/cgi-bin/media/upload?access_token=ACCESS_TOKEN&type=TYPE";
	
	
	//微信渠道
	public static final Integer MESG_CHANNEL_WEIXIN = new Integer(1);
	
	public static final String RETURN_URL = "http://DONAIM_NAME/mogoroom-partnerpc/weixin/trans/viewPushDtl?id=ID&timestamp=TIMESTAMP&nonce=NONCE&signature=SIGNATURE";
	
	public static final String WEIXIN_MESG_TEMPLET_APPOINT = new StringBuffer("{\"touser\":\"OPENID\",")
															.append("\"template_id\":\"TEMPLATEID\",")
															.append("\"url\":\"URL\",")
															.append("\"data\":{")
															.append("\"first\":{\"value\":\"FIRST\"},")
															.append("\"keyword1\":{\"value\":\"KEYWORD1\"},")
															.append("\"keyword2\":{\"value\":\"KEYWORD2\"},")
															.append("\"keyword3\":{\"value\":\"KEYWORD3\"},")
															.append("\"remark\":{\"value\":\"REMARK\"}")
															.append("}")
															.append("}").toString();
	
	
	 /** 
     * 请求消息类型：文本 
     */  
    public static final String REQ_MESSAGE_TYPE_TEXT = "text";  
    
    /** 
     * 返回消息类型：文本 
     */  
    public static final String RESP_MESSAGE_TYPE_TEXT = "text";  
  
    /** 
     * 请求消息类型：图片 
     */  
    public static final String REQ_MESSAGE_TYPE_IMAGE = "image";  
  
    /** 
     * 请求消息类型：链接 
     */  
    public static final String REQ_MESSAGE_TYPE_LINK = "link";  
  
    /** 
     * 请求消息类型：地理位置 
     */  
    public static final String REQ_MESSAGE_TYPE_LOCATION = "location";  
  
    /** 
     * 请求消息类型：音频 
     */  
    public static final String REQ_MESSAGE_TYPE_VOICE = "voice";  
  
    /** 
     * 请求消息类型：推送 
     */  
    public static final String REQ_MESSAGE_TYPE_EVENT = "event";
    
    /** 
     * 事件类型：subscribe(订阅) 
     */  
    public static final String EVENT_TYPE_SUBSCRIBE = "subscribe";  
  
    /** 
     * 事件类型：unsubscribe(取消订阅) 
     */  
    public static final String EVENT_TYPE_UNSUBSCRIBE = "unsubscribe";
    
    /**
     * 扫描带参数二维码事件
     */
    public static final String EVENT_TYPE_SCAN = "SCAN";
  
    /** 
     * 事件类型：CLICK(自定义菜单点击事件) 
     */  
    public static final String EVENT_TYPE_CLICK = "CLICK";
    
    //生成二维码
    public static String QRCODE_CREATE_URL = "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=TOKEN";
    
    public static final String UPOAD_IMG_FOLDER_KEY_PREFIX = "UPLOAD-IMG-FOLDER-";
    
    public static final String UPOAD_IMG_FILE_KEY_PREFIX = "UPLOAD-IMG-FILE-";
	
}
